package net.xdclass.springboot.controller;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class OtherHttpController {

    private Map<String,Object> param = new HashMap<>();

    @PostMapping("/v1/login")
    public Object login(String id,String pwd){
        param.clear();
        param.put("id",id);
        param.put("pwd",pwd);
        return param;
    }

    @PutMapping("/v1/put")
    public Object put(String id,String pwd){
        param.clear();
        param.put("id",id);
        param.put("pwd",pwd);
        return param;
    }

    @DeleteMapping("/v1/delete")
    public Object delete(String id,String pwd){
        param.clear();
        param.put("id",id);
        param.put("pwd",pwd);
        return param;
    }

}
